package com.frxuexi.lib_base.db

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import androidx.room.Update
import com.frxuexi.lib_base.entity.Comment
import com.frxuexi.lib_base.entity.CommentBean
import com.frxuexi.lib_base.entity.CommentBeanItem
import com.frxuexi.lib_base.entity.UserEntity

@Dao
interface CommentDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun addComment(bean: Comment):Long


    @Query("select * from comment where itemid=:videoId order by createtime desc")
    fun getComments(videoId:Int):List<Comment>

    @Update
    fun zan(bean: Comment):Int

}